home *** CD-ROM | disk | FTP | other *** search
- ; script to install AXsh 1.31
-
- (set newversion 1)
- (set newrevision 31)
-
- (transcript "Checking user level.")
- (if (< @user-level 1)
- (
- (transcript "Installation aborted due to too low user level.")
- (abort "AXsh installation requires at least the \"average\" user "
- "level. Restart installation and select appropriate user level."
- )
- )
- )
-
- (onerror
- (makeassign "AXsh")
- )
-
- (set #bad-kick
- (cat "You must be using Kickstart 2.04 to install using this script. "
- "Double-click the 'AXsh-Install_1.3' icon to install AXsh on "
- "Kickstart 1.2 or 1.3 machines."))
-
- (complete 0)
-
- ; check kick
- (set vernum (getversion "graphics.library" (resident)))
- (set ver (/ vernum 65536))
- (set rev (- vernum (* ver 65536) ) )
-
- (if (< ver 37)
- ((abort #bad-kick)))
-
- ; see if this is really an update
- (set is_update 0)
- (set AXsh_dest (getassign "AXsh" "av"))
-
- ; if update, be sure they want program in same place
- (if AXsh_dest
- (if (askbool
- (prompt "Your current copy of AXsh appears to be located in the drawer named \""
- AXsh_dest "\". Do you want to update the installed version ?"
- )
- (help "The installer has determined that you may already have a copy "
- "of AXsh installed on your system. If this is wrong or you want "
- "the update installed elsewhere, select NO as an answer. "
- "Otherwise, select YES.\n"
- "If you select YES, only binaries, manuals, information files and "
- "possibly language files are copied. Configuration files, home "
- "directories nor news/mail system files are NOT overwritten.\n"
- )
- (default 1)
- )
- (set is_update 1) ; if user wants in same place
- (set AXsh_dest ; if user wants in different place or total rewrite
- (askdir (prompt "In which disk or drawer should AXsh be installed?")
- (help "All AXsh subdirectoried will be created under this "
- "directory. If you are not dedicating a whole disk "
- "partition for AXsh, you should create a subdirectory "
- "for AXsh yourself.\n\n"
- @askdir-help)
- (default AXsh_dest)
- (disk)
- )
- )
- )
- ; else if not an update, get a location for program
- (set AXsh_dest
- (askdir (prompt "In which disk or drawer should AXsh be installed?")
- (help "All AXsh subdirectoried will be created under this "
- "directory. If you are not dedicating a whole disk "
- "partition for AXsh, you should create a subdirectory "
- "for AXsh yourself.\n\n"
- @askdir-help)
- (default @default-dest)
- (disk)
- )
- )
- )
-
-
- (set oldver (getversion (tackon AXsh_dest "bin/AXsh")))
- (set oldv (/ oldver 65536))
- (set oldr (- oldver (* oldv 65536) ) )
-
- (if (or (and (= oldv newversion) (>= oldr newrevision)) (> oldv newversion))
- (message "You already have AXsh version greater or equal than "
- newversion "." newrevision " installed in \"" AXsh_dest
- "\" (AXsh " oldv "." oldr ")\n" )
- )
-
-
- ; at this point we have a valid destination, so we tell installer where
- ; the application will end up so the exit page will be correct -- also,
- ; the installation log file (if any) will be copied to the destination
- (set @default-dest AXsh_dest)
-
- (if (getassign "AXsh" "vd")
- (
- (transcript "AXsh: is a partition!\n")
- (if (not (= AXsh_dest "AXsh:"))
- (if (askbool
- (prompt "Your current copy of AXsh is in a Volume.\n"
- "\"Assign AXsh: " AXsh_dest "\" will fail.\n"
- "Do you still want to continue ?"
- )
- (help "The installer has determined that your old version of AXsh "
- "is installed in a partition named AXsh. Cancelling this by "
- "an assign is not possible and thus this installation will not "
- "be totally successfull until you relabel the partition.\n"
- "You can also install AXsh on top of the old AXsh system, "
- "because old configuration files are preserved.\n"
- )
- (default 1)
- )
- (transcript "Continuing installation...\n")
- (exit (quiet))
- )
- )
- )
- )
-
- (askdisk
- (prompt "Please insert \n the master program disk \n labeled \"AXshPack\".")
- (help "The AXsh program and other options will be copied "
- "from \"AXshPack:\" into your system.")
- (dest "AXshPack")
- (newname "AXsh")
- (assigns) ; Allow assigns so you don't need to use a floppy
- )
-
- (if (exists "locale:" (noreq))
- ; KS2.1 or newer
- (set whichfiles
- (askoptions
- (prompt "Please select the files to be copied")
- (help "This allows you to select only certain parts of the AXsh "
- "system to be installed on your hard drive. For normal installation "
- "select all the items")
- (choices "AXsh system"
- "Manual pages"
- "WB launchable system services"
- "Languages")
- )
- )
- ; KS2.0
- (set whichfiles
- (askoptions
- (prompt "Please select the files to be copied")
- (help "This allows you to select only certain parts of the AXsh "
- "system to be installed on your hard drive. For normal installation "
- "select all the items")
- (choices "AXsh system"
- "Manual pages"
- "WB launchable system services")
- )
- )
- )
-
- (if (in whichfiles 0)
- (
- (makedir (tackon AXsh_dest "bin") (infos))
- (makedir (tackon AXsh_dest "info") (infos))
- (makedir (tackon AXsh_dest "storage") (infos))
-
- (copyfiles
- (source "AXshPack:bin")
- (dest (tackon AXsh_dest "bin"))
- (infos) (all)
- )
-
- ; If we are updating, do not overwrite config files
- (if (or (not is_update)
- (not (exists (tackon AXsh_dest "etc") (noreq))))
- (
- (makedir (tackon AXsh_dest "etc") (infos))
- (copyfiles
- (source "AXshPack:etc")
- (dest (tackon AXsh_dest "etc"))
- (infos) (all)
- )
- )
- )
- (if (or (not is_update)
- (not (exists (tackon AXsh_dest "home") (noreq))))
- (
- (makedir (tackon AXsh_dest "home") (infos))
- (copyfiles
- (source "AXshPack:home")
- (dest (tackon AXsh_dest "home"))
- (infos) (all)
- )
- )
- )
- (if (or (not is_update)
- (not (exists (tackon AXsh_dest "usr") (noreq))))
- (
- (makedir (tackon AXsh_dest "usr") (infos))
- (copyfiles
- (source "AXshPack:usr")
- (dest (tackon AXsh_dest "usr"))
- (infos) (all)
- )
- )
- )
- (complete 50)
-
- (copyfiles
- (source "AXshPack:info")
- (dest (tackon AXsh_dest "info"))
- (infos) (all)
- )
- (copyfiles
- (source "AXshPack:storage")
- (dest (tackon AXsh_dest "storage"))
- (infos) (all)
- )
- (copyfiles
- (source "AXshPack:AXsh.info")
- (dest AXsh_dest)
- )
- )
- )
-
- (complete 80)
-
- (if (in whichfiles 1)
- (
- (copyfiles
- (source "AXshPack:man")
- (dest (tackon AXsh_dest "man"))
- (infos) (all)
- )
- (copyfiles
- (source (cat "AXshPack:AXshUpdates" newversion "." newrevision))
- (dest AXsh_dest)
- (infos)
- )
- )
- )
-
- (if (in whichfiles 2)
- (
- (copyfiles
- (source "AXshPack:storage/AX-Sysghost.info")
- (dest "SYS:WBStartup")
- )
- (copyfiles
- (source "AXshPack:storage/AX-Server.info")
- (dest "SYS:WBStartup")
- )
- ; If user-startup mounts handlers automatically (>=2.1)
- ; just use that method. We need to copy the handlers to L:
- ; because AXsh: is not mounted when they are mounted.
- ; Also, mount files (icons) refer to handlers in L:
- (if (exists "Devs:DOSDrivers" (noreq))
- (
- (copyfiles
- (source "AXshPack:Storage/DosDrivers/NEWAUX")
- (dest "DEVS:DosDrivers")
- (infos)
- )
- (copyfiles
- (source "AXshPack:bin/NEWAUX-Handler")
- (dest "L:")
- )
- (copyfiles
- (source "AXshPack:bin/AXAUX-Handler")
- (dest "L:")
- )
- )
- )
- ; In pre 2.1 system, add the mount command(s) to user-startup
- )
- )
-
- (if (in whichfiles 3)
- (
- (working "Unpacking language files..")
- (if (run "lha -m x AXshPack:Storage/Locale/Catalogs Locale:")
- (message "Unpacking unsuccessfull!")
- )
- (copyfiles
- (source "AXshPack:Storage/Presets/AXsh.locale")
- (dest "SYS:Prefs/Presets")
- (infos)
- )
- )
- )
-
-
- (complete 95)
-
- ; modify S:User-Startup
-
- (if (= "AXsh:" AXsh_dest)
- (transcript "AXsh assign/volume already exists, user-startup not touched\n")
- (if (exists "Devs:DOSDrivers" (noreq))
- (startup "AXsh"
- (prompt "I need to add \"assign AXsh: " AXsh_dest "\" to the \"S:user-startup\" "
- "so that your system will be properly configured to use AXsh.")
- (help "Do this or AXsh won't work!!")
- (command "ASSIGN AXsh: \"" AXsh_dest "\"\n")
- )
- (startup "AXsh"
- (prompt "I need to add \"assign AXsh: " AXsh_dest "\" and \n"
- " \"mount NEWAUX: from AXsh:etc/Mountlist.AXsh\"\n"
- " to the \"S:user-startup\" "
- "so that your system will be properly configured to use AXsh.")
- (help "Do this or AXsh won't work!!")
- (command "ASSIGN AXsh: \"" AXsh_dest "\"\n"
- "mount NEWAUX: from AXsh:etc/Mountlist.AXsh\n")
- )
- )
- )
-
- (complete 100)
- (if is_update
- (message "Because AXsh was installed on top of an old version, "
- "configuration files were not updated. Read the file "
- "AXshUpdates" newversion "." newrevision " to find out "
- "about changes in the configuration files and change them "
- "if needed.\n"
- )
- )
-
-
- ; reinitialize assigns
-
- (if (not @pretend)
- (makeassign "AXsh" AXsh_dest)
- )
-
- ; cleanup
- (makeassign "AXshPack" (safe))
-
- ; this is not strictly necessary, but doesn't hurt
- (exit)
-